import axios from '@/api/fetch';
import SERVER from '@/api/server';
// 车辆配置五级选择
export const vehicleConfiguration = (id, params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/productInfo/productTreeNew`, { params: { type: id, level: 6, ...params } });
// 品牌列表
export const getAllbrand = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/queryBrandDictAll`, { params })
// 车系列表
export const getAllseriess = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/brandsdict/${params.brandId}/seriessdictAll`, { params })
// 车型列表
export const getAllmodels = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/brandsdict/${params.brandId}/seriessdictAll/${params.seriesId}/modelsdictAll`, { params })
// 配置列表
export const getAllpackage = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/brandsdict/${params.brandId}/seriessdictAll/${params.seriesId}/modelsdictAll/${params.modelId}/packagedictAll`, { params })
// 选装列表
export const getAlloption= (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/brandsdict/${params.brandId}/seriessdictAll/${params.seriesId}/modelsdictAll/${params.modelId}/packagedictAll/${params.packageId}/optiondictAll`, { params })
// 内饰列表
export const getAllInterior = (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/colors/colorinfo/Interior`, { params })
// 外饰列表
export const getAllexterior= (params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/colors/colorinfo/exterior`, { params })

//根据车型查询配置
export const getProductPackage = (params) => axios.post(`${SERVER.WHOLESALES}/baseData/getProductPackage`, params);
//根据配置查询外饰色
export const getProductColor = (params) => axios.post(`${SERVER.WHOLESALES}/baseData/getProductColor`, params);
//根据外饰色查询内饰色
export const getProductTrimColor = (params) => axios.post(`${SERVER.WHOLESALES}/baseData/getProductTrimColor`, params);
//根据内饰色查询选装
export const getProductOption = (params) => axios.post(`${SERVER.WHOLESALES}/baseData/getProductOption`, params);
